package com.chapter14.demo2;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Stream;

/**
 * 排序
 */
public class SortStream {
    public static void main(String[] args) {
        List<Integer> list = Arrays.asList(1,3,5,7,9,11,13,5,7,9);
        //排序
        Stream<Integer> stream = list.stream();
        stream.sorted().forEach(x-> System.out.printf("%d ",x));

    }
}
